package com.erbao.dp.observer;

/**
 * @author CaoBaoYin
 * @since 2021/9/13 21:12
 */
public class Main02 {


    static class Child {
        private boolean cry = false;

        public boolean isCry () {
            return cry;
        }

        public void wakeup(){
            System.out.println("wake up ! wuwuuwuwuu……");
            cry = true;
        }
    }

    public static void main(String[] args) {
        Child child = new Child();
        while (!child.isCry()){
            // TODO: 2021/9/13 不哭了再处理

        }
    }
}
